<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function getSum(arr){
        var newArr=[]
        var sum=0;
        for(i=0;i<arr.length;i++){
            if(newArr.indexOf(arr[i])==-1&&!isNaN(arr[i])){
               if(typeof(arr[i])=='number'){
                newArr.push(arr[i])
                sum+=arr[i]
               }
            }
                      
            
        }
        return sum;
    }
    console.log(getSum([undefined,"23year",19,"097",1,"hello",null,1]));

    // var a=12;
    // console.log(typeof(a));
    
</script>